import request from '@/utils/request'

export const getAdminInfoListService = (username: string) => {
  if (username === '' || username === null || username === undefined) {
    return request.get('/admin/getAdminInfo')
  }
  return request.get('/admin/getAdminInfo?username=' + username)
}
export const addAdminService = (admin: object) => {
  return request.post('/admin/addAdmin', admin)
}
export const editAdminService = (admin: object) => {
  return request.post('/admin/updateAdminInfo', admin)
}
export const deleteAdminService = (username: string) => {
  return request.get('/admin/deleteAdminInfo?username=' + username)
}
